﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using TinyMoocSite.Models;

namespace TinyMoocSite.DataAccessLayer
{
    public class TinyMoocDAL : DbContext
    {
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<UserInfo>().ToTable("UserInfo");
            modelBuilder.Entity<CourseInfo>().ToTable("CourseInfo");
            base.OnModelCreating(modelBuilder);
        }

        public DbSet<UserInfo> UserInfo { get; set; }

        public DbSet<CourseInfo> CourseInfo { get; set; }

        public DbSet<Classification> Classification { get; set; }

        public DbSet<AttachedPage> AttachedPage { get; set; }

        public DbSet<Discuss> Discuss { get; set; }

        public DbSet<Homework> Homework { get; set; }

        public DbSet<Resource> Resource { get; set; }

        public DbSet<DiscussReply> DiscussReply { get; set; }

        public DbSet<HomeworkHistory> HomeworkHistory { get; set; }

        public DbSet<HomeworkEntry> HomeworkEntry { get; set; }
    }
}